<template>
  <div class="common-json-view-wrap">
    <json-view :data="json"></json-view>
  </div>
</template>

<script>
import JsonView from 'vue-json-views'

export default {
  name: 'CommonJsonView',
  props: {
    json: {
      type: Object,
      default: ({
        describe: '请传入JSON对象'
      })
    }
  },
  components: {
    JsonView
  }
}
</script>

<style scoped lang="scss">
.common-json-view-wrap {
  width: 100%;
  height: 100%;
  overflow: scroll;
  border-radius: 4px;
  box-shadow: 0 0 4px #ccc;
}
</style>
